package lab02.test12;

/**
 * Created by 婷婷 on 2017/10/20.
 */
    //子类Rectangular继承Shape父类
public class Rectangular extends Shape {

    //属性：
    double height;
    double width;

    //重写父类Shape的area()，perimeter()方法
    @Override
    double area() {
        return height*width;
    }

    @Override
    double perimeter() {
        return 2*(height+width);
    }
}
